/*******************************************************************************
 * Size: 16 px
 * Bpp: 1
 * Opts: --bpp 1 --size 16 --font /Users/chenhuihong/SquareLine/assets/霞鹜致宋.ttf -o /Users/chenhuihong/SquareLine/assets/ui_font_font16CN.c --format lvgl --symbols 关闭制冷除湿热自动开灯关灯色温高低亮度 --no-compress --no-prefilter
 ******************************************************************************/

#include "../ui.h"

#ifndef UI_FONT_FONT16CN
#define UI_FONT_FONT16CN 1
#endif

#if UI_FONT_FONT16CN

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+4EAE "亮" */
    0x1, 0x0, 0x4, 0x27, 0xef, 0x7, 0xfc, 0x10,
    0x20, 0x7f, 0x84, 0x0, 0x1f, 0xff, 0x40, 0xa,
    0x12, 0x0, 0x48, 0x3, 0x22, 0x8, 0x89, 0xc1,
    0xf0,

    /* U+4F4E "低" */
    0x18, 0x0, 0x41, 0xe1, 0x3c, 0x4, 0x90, 0x22,
    0x40, 0x89, 0x16, 0x3f, 0xe8, 0x90, 0xa2, 0x60,
    0x88, 0x82, 0x22, 0x8, 0xed, 0x2c, 0x14, 0x80,
    0x32, 0x7e, 0x40,

    /* U+5173 "关" */
    0x0, 0x40, 0x61, 0x0, 0x88, 0x2, 0x44, 0x7f,
    0xf0, 0x8, 0x0, 0x20, 0x0, 0x82, 0xff, 0xf8,
    0x8, 0x0, 0x50, 0x3, 0x20, 0x18, 0x40, 0x80,
    0xcc, 0x0, 0x80,

    /* U+51B7 "冷" */
    0x1, 0x82, 0x6, 0x5, 0x24, 0x14, 0x90, 0x14,
    0x70, 0xaf, 0x22, 0x0, 0x13, 0xfc, 0x41, 0x13,
    0x4, 0x44, 0x11, 0x10, 0x5c, 0x41, 0x0, 0x4,
    0x0,

    /* U+5236 "制" */
    0x28, 0x4, 0x90, 0x9, 0xfd, 0x12, 0x42, 0x28,
    0x84, 0x4f, 0xe8, 0x82, 0x11, 0x3f, 0xa2, 0x49,
    0x44, 0x92, 0x89, 0x24, 0x12, 0x48, 0x24, 0xb0,
    0x41, 0x3, 0x80,

    /* U+52A8 "动" */
    0x0, 0x43, 0xf1, 0x0, 0x4, 0x0, 0x12, 0x5,
    0xfb, 0xf9, 0x22, 0x4, 0x88, 0x12, 0x28, 0x49,
    0x12, 0x25, 0xc8, 0xb9, 0x42, 0x82, 0x18, 0x10,
    0xc0,

    /* U+5EA6 "度" */
    0x0, 0x80, 0x1, 0x8, 0xff, 0xf9, 0x11, 0x23,
    0xff, 0xe4, 0x44, 0x8, 0xf8, 0x10, 0x0, 0x2f,
    0xf8, 0x44, 0x21, 0x4, 0x82, 0x6, 0x4, 0x33,
    0x93, 0x81, 0x80,

    /* U+5F00 "开" */
    0x0, 0x9, 0xff, 0xe0, 0x84, 0x2, 0x10, 0x8,
    0x40, 0x21, 0xf, 0xff, 0xc2, 0x10, 0x8, 0x40,
    0x21, 0x1, 0x4, 0x4, 0x10, 0x20, 0x41, 0x1,
    0x0,

    /* U+6E29 "温" */
    0x0, 0x8, 0x47, 0xf0, 0x49, 0x20, 0x12, 0x40,
    0xaa, 0x89, 0x55, 0xc, 0x82, 0x9, 0xfc, 0x10,
    0x0, 0x4f, 0xf8, 0x92, 0x93, 0x25, 0x22, 0x4a,
    0x44, 0x94, 0xcb, 0xff, 0x80,

    /* U+6E7F "湿" */
    0x40, 0x10, 0x9f, 0xe2, 0x41, 0x5, 0xfc, 0xd4,
    0x11, 0x9f, 0xc2, 0x41, 0x8, 0x58, 0x21, 0x49,
    0x25, 0x2c, 0x55, 0x11, 0x54, 0x41, 0x41, 0x7f,
    0xf0,

    /* U+706F "灯" */
    0x20, 0x4, 0x47, 0xfc, 0x90, 0x83, 0x41, 0x6,
    0x82, 0xa, 0x4, 0x18, 0x8, 0x70, 0x10, 0x20,
    0x20, 0x60, 0x40, 0xa0, 0x81, 0x61, 0x4, 0x42,
    0x10, 0x1c, 0x0,

    /* U+70ED "热" */
    0x20, 0x80, 0x82, 0x8f, 0xff, 0x8, 0x28, 0x20,
    0xa0, 0xee, 0x8e, 0x1a, 0x68, 0x55, 0x22, 0x19,
    0xb0, 0x30, 0x92, 0x11, 0x26, 0x44, 0xce, 0x11,
    0x10,

    /* U+81EA "自" */
    0xc, 0x2, 0x1, 0x7, 0xff, 0x80, 0x60, 0x1f,
    0xfe, 0x1, 0x80, 0x60, 0x1f, 0xfe, 0x1, 0x80,
    0x7f, 0xf8, 0x4,

    /* U+8272 "色" */
    0x8, 0x0, 0x30, 0x1, 0xfc, 0x4, 0x20, 0x21,
    0x11, 0xff, 0xea, 0x11, 0x8, 0x44, 0x21, 0x10,
    0xff, 0xc2, 0x1, 0x8, 0x2, 0x20, 0x8, 0x80,
    0x23, 0xff, 0x80,

    /* U+95ED "闭" */
    0x60, 0x11, 0xbf, 0x84, 0x5, 0x2, 0x28, 0x15,
    0x5f, 0xea, 0xc, 0x50, 0xa2, 0x89, 0x14, 0x88,
    0xa8, 0x45, 0x6, 0x28, 0x1, 0x40, 0x38,

    /* U+9664 "除" */
    0x10, 0x83, 0xc6, 0x9, 0x14, 0x28, 0xd8, 0xa2,
    0x32, 0x90, 0xea, 0xbe, 0xe8, 0x20, 0x97, 0xfa,
    0x42, 0x9, 0x6a, 0x39, 0x24, 0x88, 0x8a, 0x42,
    0x28, 0x38, 0x0,

    /* U+9AD8 "高" */
    0x2, 0x0, 0x8, 0x37, 0xdf, 0x7, 0xf8, 0x10,
    0x40, 0x7f, 0x1, 0x0, 0x1f, 0xfe, 0x40, 0x9,
    0x3f, 0x24, 0x84, 0x93, 0xf2, 0x48, 0x9, 0x0,
    0xe0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 25, .adv_w = 256, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 52, .adv_w = 256, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 79, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 104, .adv_w = 256, .box_w = 15, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 131, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 156, .adv_w = 256, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 183, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 208, .adv_w = 256, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 237, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 262, .adv_w = 256, .box_w = 15, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 289, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 314, .adv_w = 256, .box_w = 10, .box_h = 15, .ofs_x = 3, .ofs_y = -1},
    {.bitmap_index = 333, .adv_w = 256, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 360, .adv_w = 256, .box_w = 13, .box_h = 14, .ofs_x = 2, .ofs_y = -1},
    {.bitmap_index = 383, .adv_w = 256, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 410, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = -1}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0xa0, 0x2c5, 0x309, 0x388, 0x3fa, 0xff8, 0x1052,
    0x1f7b, 0x1fd1, 0x21c1, 0x223f, 0x333c, 0x33c4, 0x473f, 0x47b6,
    0x4c2a
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 20142, .range_length = 19499, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 17, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 1,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
    .cache = &cache
#endif
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t ui_font_font16CN = {
#else
lv_font_t ui_font_font16CN = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 15,          /*The maximum line height required by the font*/
    .base_line = 1,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -2,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};



#endif /*#if UI_FONT_FONT16CN*/

